﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace team1337blarg
{
    class MySprite
    {

        public void CheckIfOnScreen(int maxWidth, int maxHeight)
        {//keeps the sprite in the window
            if (this.screenPositionX < 0)
            {
                this.screenPositionX = 0;
            }
            if (this.screenPositionY < 0)
            {
                this.screenPositionY = 0;
            }
            if ((this.screenPositionX + this.spriteWidth) > maxWidth)
            {
                this.screenPositionX = maxWidth - this.spriteWidth;
            }
            if ((this.screenPositionY + this.spriteHeight) > maxHeight)
            {
                this.screenPositionY = maxHeight - this.spriteHeight;
            }
        }



        public int spriteStartX;
        public int spriteStartY;
        public int spriteWidth;
        public int spriteHeight;
        public int screenPositionX;
        public int screenPositionY;
        public int moveSpeed;
    }
}
